cmake_minimum_required(VERSION 3.8)
project(filesystem_copy_install)
file(COPY "files/file1.txt" DESTINATION "files")
file(COPY "files/file1.txt" DESTINATION "files1" FILE_PERMISSIONS OWNER_READ)
file(COPY "files/file1.txt" DESTINATION "files2" USE_SOURCE_PERMISSIONS)
file(COPY "files/file1.txt" DESTINATION "files3" NO_SOURCE_PERMISSIONS)
file(COPY "files/libabc.so" DESTINATION "lib" FOLLOW_SYMLINK_CHAIN)
file(COPY "${PROJECT_SOURCE_DIR}/files" DESTINATION "include" FILES_MATCHING PATTERN "*.h")
file(COPY "${PROJECT_SOURCE_DIR}/files" DESTINATION "include1" FILES_MATCHING REGEX "[a-z]\\.h$")
file(COPY "${PROJECT_SOURCE_DIR}/files" DESTINATION "include2" PATTERN "test*" EXCLUDE) 
file(COPY "${PROJECT_SOURCE_DIR}/files" DESTINATION "include3" FILES_MATCHING PATTERN "*.h" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
file(COPY "${PROJECT_SOURCE_DIR}/files" DESTINATION "include4" DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ FILES_MATCHING PATTERN "*.h")
